package com.food.restaurantpro.objects;

import com.food.restaurantpro.RestaurantApp;
import com.food.restaurantpro.utils.Prefs;

public class AboutUs {
	private String mTitle = "";
	private String mContent = "";
	private String mImageURL = "";
	
	public String getTitle() {
		return mTitle;
	}
	
	public void setTitle(String mTitle) {
		this.mTitle = mTitle;
	}

	public String getContent() {
		return mContent;
	}

	public void setContent(String mContent) {
		this.mContent = mContent;
	}

	public String getImageURL() {
		return mImageURL;
	}

	public void setImageURL(String mImageURL) {
		this.mImageURL = mImageURL;
	}
	
	public static AboutUs getAboutUs() {
		AboutUs aboutUs = new AboutUs();
		Prefs prefs = new Prefs(RestaurantApp.getInstance());
		aboutUs.setTitle(prefs.getStringValue("", Prefs.KEY_ABOUT_US_TITLE));
		aboutUs.setContent(prefs.getStringValue("", Prefs.KEY_ABOUT_US_CONTENT));
		aboutUs.setImageURL(prefs.getStringValue("", Prefs.KEY_ABOUT_US_IMAGE_URL));
		return aboutUs;
	}
	
	public static void saveAboutUs(AboutUs aboutUs) {
		Prefs prefs = new Prefs(RestaurantApp.getInstance());
		prefs.putStringValue(aboutUs.getTitle(), Prefs.KEY_ABOUT_US_TITLE);
		prefs.putStringValue(aboutUs.getContent(), Prefs.KEY_ABOUT_US_CONTENT);
		prefs.putStringValue(aboutUs.getImageURL(), Prefs.KEY_ABOUT_US_IMAGE_URL);
	}
}
